useR 2019 - Toulouse - 2019/07/09

Produce publication ready thematic maps

Standing on the Shoulders of Giants

Previously:

sp & rgeos

Since version 2.0.0:

sf

Alternative Solutions

ggplot2 (Wickham, 2016) + ggspatial (Dunnington, 2018)

  • A general purpose graphic library
  • Better integration of sf objects.

tmap (Tennekes, 2018)

  • A mapping library with similar functionalities
  • Uses a different grammar (à la ggplot2)
  • Allows interactive maps
  • Uses more dependancies

Main Features: Symbologies

Main Features: Transformations

Main Features: Map Layout

Documentation

A Cheat Sheet

A Website

A Vignette

Examples

  • osrm: Get road distances (time) between each municipalities.

  • SpatialPosition: Compute gravitationnal accessibility based on road distances.

  • cartography::getBreaks(): Classify data

  • cartography::carto.pal(): Use color palettes from the package

  • cartography::choroLayer(): Plot the choropleth map

  • cartography::getFigDim(): Find the correct ratio for png export.

  • sf: a lot geodata matransformations

  • cartography::propSymolsLayer(): Display the proportionnal symbols

  • cartography::layoutLayer(): Display the map layout

  • cartography::getPencilLayer(): Transform polygons to hand-drawn polylines

  • cartography::choroLayer(): Display a choropleth map




  • spatstats: Compute KDE.

  • tanaka: Display the shaded contour lines

  • cartography::LegendChoro(): Plot the Legend

  • cartography::layoutLayer(): Plot the map layout

  • cartography::choroLayer(): Choropleth map

  • cartography::getBorders(): Extract borders between countries

  • cartography::discLayer(): Map the discontinuities on borders

  • cartography::layoutLayer(): Map layout

Thank You